<?php

namespace common\models;


use yii\db\ActiveRecord;

class ActiveAttr extends ActiveRecord
{
    public static function tableName()
    {
        return 'active_attr';
    }

    public function rules(){
        return [
            [['attribute_value_id','attr_img'],'string'],
            [['id','goods_attre_id','inventory','sales_volume','display_sales','is_del','create_time','update_time','active_id'],'integer'],
            [['collage_price','original_price'],'double']
        ];
    }

    public function attributeLabels()
    {
        return [
            'id' => 'id',
            'goods_attre_id' =>  '商品属性id',
            'attribute_value_id' =>  '商品属性值id',
            'active_id' =>  '活动id',
            'inventory' =>  '库存',
            'collage_price' =>  '拼团价',
            'original_price' =>  '原价',
            'attr_img' =>  '属性图片',
            'sales_volume' =>  '销量',
            'display_sales' =>  '以团数量',
            'is_del' =>  '是否删除',
            'create_time' =>  '创建时间',
            'update_time' =>  '更新时间',
        ];
    }
}